def detect_backdoor(model, trigger, threshold=0.5):
    """
    检测模型中是否存在后门
    :param model: 模型
    :param trigger: 触发器
    :param threshold: 阈值
    :return: 是否存在后门
    """
    output = model.predict(trigger)
    return np.max(output) > threshold

# 示例
model = "YourModel"
trigger = np.random.randn(10)
is_backdoor = detect_backdoor(model, trigger)
print(f"Is backdoor: {is_backdoor}")